import 'package:enterprise_v6_app/app/components/custom_app_bar.dart';
import 'package:enterprise_v6_app/app/core/core.dart';
import 'package:enterprise_v6_app/app/modules/application/emergency/event/detail/accident_alarm.dart';
import 'package:enterprise_v6_app/app/modules/application/emergency/event/detail/dispatch.dart';
import 'package:enterprise_v6_app/app/modules/application/emergency/event/detail/disposal_mode.dart';
import 'package:enterprise_v6_app/app/modules/application/emergency/event/detail/renewal_record.dart';
import 'package:enterprise_v6_app/app/modules/application/emergency/event/detail/rescue_process.dart';

/// 事故事件详情
class EventDetailTab extends StatelessWidget {
  const EventDetailTab({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: CustomAppBar(
          titleText: '详情',
        ),
        body: DefaultTabController(
          length: 5,
          child: Column(
            children: [
              AppGaps.vGap12,
              Container(
                height: 54.w,
                margin: EdgeInsets.symmetric(horizontal: 14.w),
                child: TabBar(
                  tabAlignment: TabAlignment.center,
                  tabs: const [
                    Tab(text: '事故事件报警'),
                    Tab(text: '续报记录'),
                    Tab(text: '救援过程'),
                    Tab(text: '处置方案'),
                    Tab(text: '指挥调度'),
                  ],
                  isScrollable: true,
                  dividerColor: Colors.transparent,
                  labelPadding: EdgeInsets.only(bottom: 15.w,left: 10.w,right: 10.w),
                  labelStyle: TextStyle(
                    fontSize: 16.sp,
                    fontWeight: FontWeight.w500,
                  ),
                  unselectedLabelStyle: TextStyle(
                    fontSize: 16.sp,
                    fontWeight: FontWeight.w500,
                  ),
                  labelColor: Colors.black,
                  unselectedLabelColor: const Color(0xffA0A7B5),
                  indicatorPadding: EdgeInsets.only(top: 35.w, bottom: 10.w),
                  indicator: const BoxDecoration(
                    image: DecorationImage(
                      image: AssetImage(
                        AppImages.icon_app_work_plan
                      ),
                    ),
                  ),
                ),
              ),
              AppGaps.vGap10,
              Expanded(
                child: Container(
                  color: const Color(0xffF5F5F6),
                  child:  const TabBarView(
                    children: [
                      AccidentAlarm(),
                      RenewalRecord(),
                      RescueProcess(),
                      DisposalMode(),
                      Dispatch(),
                    ],
                  ),
                ),
              ),
            ],
          ),
        ));
  }
}
